Extraneous request on PATH_INFO url

Extraneous request on PATH_INFO url

am 03.05.2010 13:06:22 von bertolini.cedric

--00c09f8a54565b1b2c0485ae95c6
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi all,

I'm migrating our web server from Apache1.3/modperl1 to Apache2.2/modperl2.
Everything went smoothly (thanks for the great documentation on
perl.apache.org !), until I began to set up FixurHandlers and
CleanUpHandlers to manage the user session.

At that point, I noticed something strange : when the browser requests a
script with a path_info part, my FixupHandler script traces a request on th=
e
path_info part. e.g. an initial request to
http://myserver.domain.com/perl/script.pl/perl/module generates a request t=
o
/perl/script.pl, but also an inner (sub?) request to /perl/module. The
subrequest doesn't seem to call the ResponseHandler, it goes straigth from
Fixup to CleanUp.

So I see this:

[MapToStorage] /perl/script.pl/perl/module
[Fixup] /perl/script.pl
[MapToStorage] /perl/module
[Fixup] /perl/module
[CleanUp] /perl/module
[Response] /perl/script.pl
[CleanUp] /perl/script.pl

It's kinda strange, since /perl/module is just a path_info, but I can live
with that. The problem is that my Fixup handler tries to actually fix thing=
s
up for the upcoming request, like tie-ing a variable for my session. When
there's no actual request, I'm tie-ing the variable for nothing, and it's
detrimental.

So I have two questions :

Can I prevent the subrequest ? Maybe a return value to the main Fixup
handler ?
Can I inspect the subrequest to know that it is a subrequest ? Maybe a $r
method ?

Thanks for your time,
C=E9dric Bertolini

--00c09f8a54565b1b2c0485ae95c6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi all,

I'm=
migrating our web server from Apache1.3/modperl1 to Apache2.2/modperl2. Ev=
erything went smoothly (thanks for the great documentation on tp://perl.apache.org">perl.apache.org !), until I began to set up Fixur=
Handlers and CleanUpHandlers to manage the user session.


At that point, I noticed something strange : when the browser requests =
a script with a path_info part, my FixupHandler script traces a request on =
the path_info part. e.g. an initial request to omain.com/perl/script.pl/perl/module">http://myserver.domain .com/perl/scrip=
t.pl/perl/module
generates a request to /perl/ pl">script.pl, but also an inner (sub?) request to /perl/module.=A0 The=
subrequest doesn't seem to call the ResponseHandler, it goes straigth =
from Fixup to CleanUp.


So I see this:

[MapToStorage] /perl/ perl/module">script.pl/perl/module
[Fixup]=A0 /perl/ //script.pl">script.pl
[MapToStorage] /perl/module
[Fixup] /perl/=
module

[CleanUp] /perl/module
[Response] /perl/scr=
ipt.pl

[CleanUp] /perl/ >
It's kinda strange, since /perl/module is just a path_info, but I =
can live with that. The problem is that my Fixup handler tries to actually =
fix things up for the upcoming request, like tie-ing a variable for my sess=
ion. When there's no actual request, I'm tie-ing the variable for n=
othing, and it's detrimental.


So I have two questions :

Can I prevent the subrequest ? Maybe a=
return value to the main Fixup handler ?
Can I inspect the subrequest t=
o know that it is a subrequest ? Maybe a $r method ?

Thanks for your=
time,

C=E9dric Bertolini



--00c09f8a54565b1b2c0485ae95c6--

Re: Extraneous request on PATH_INFO url

am 03.05.2010 13:24:34 von torsten.foertsch

On Monday 03 May 2010 13:06:22 C=E9dric Bertolini wrote:
> I'm migrating our web server from Apache1.3/modperl1 to Apache2.2/modperl=
2.
> Everything went smoothly (thanks for the great documentation on
> perl.apache.org !), until I began to set up FixurHandlers and
> CleanUpHandlers to manage the user session.
>=20
> At that point, I noticed something strange : when the browser requests a
> script with a path_info part, my FixupHandler script traces a request on
> the path_info part. e.g. an initial request to
> http://myserver.domain.com/perl/script.pl/perl/module generates a request
> to /perl/script.pl, but also an inner (sub?) request to /perl/module. T=
he
> subrequest doesn't seem to call the ResponseHandler, it goes straigth fr=
om
> Fixup to CleanUp.

That's the subrequest apache uses to compute PATH_INFO_TRANSLATED, a standa=
rd=20
CGI variable.

> So I see this:
>=20
> [MapToStorage] /perl/script.pl/perl/module
> [Fixup] /perl/script.pl
> [MapToStorage] /perl/module
> [Fixup] /perl/module
> [CleanUp] /perl/module
> [Response] /perl/script.pl
> [CleanUp] /perl/script.pl
>=20
> It's kinda strange, since /perl/module is just a path_info, but I can live
> with that. The problem is that my Fixup handler tries to actually fix
> things up for the upcoming request, like tie-ing a variable for my
> session. When there's no actual request, I'm tie-ing the variable for
> nothing, and it's detrimental.
>=20
> So I have two questions :
>=20
> Can I prevent the subrequest ? Maybe a return value to the main Fixup
> handler ?

"PerlOptions -SetupEnv" or so

> Can I inspect the subrequest to know that it is a subrequest ? Maybe a $r
> method ?
>=20
$r->is_initial_req (in Apache2::RequestUtil)

Torsten Förtsch

=2D-=20
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

Re: Extraneous request on PATH_INFO url

am 03.05.2010 13:28:09 von torsten.foertsch

On Monday 03 May 2010 13:24:34 Torsten Förtsch wrote:
> That's the subrequest apache uses to compute PATH_INFO_TRANSLATED, a
> standard CGI variable.
>=20
Oops, that is PATH_TRANSLATED of course.

Torsten Förtsch

=2D-=20
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net